Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

change appPath to accept bower.json config #254

Closed
wants to merge 1 commit into from
Closed

change appPath to accept bower.json config #254

wants to merge 1 commit into from

Conversation

ajthor
Copy link

@ajthor ajthor commented Apr 26, 2014

Change appPath variable to accept bower.json config as well as the
env variable and option. The variable accepts values from the
environment variable, the bower config file, the option, and then
defaults to ‘app,’ in that order.

Change `appPath` variable to accept bower.json config as well as the
`env` variable and option. The variable accepts values from the
environment variable, the bower config file, the option, and then
defaults to ‘app,’ in that order.
@sindresorhus
Copy link
Member

Why?

@ajthor
Copy link
Author

ajthor commented Apr 28, 2014

Pull request #181 changed from the previous code in order to accept an appPath option. It looked more like what I am proposing, which also accepted a bower.json config. For some reason, the bower.json config option was removed then.

The reason I am proposing to re-implement the bower.json configuration option is mostly due to the fact that it would be nice to use the bower config to scaffold the app path rather than relying on the .yo-rc file to hold the configuration for the sub-generators. It would be nice to use a sub-generator on a folder where the main generator hasn't been run in order to generate a model rather than running the main generator in order to generate the .yo-rc file, deleting the generated files, and running the sub-generators OR by specifying the option every time.

I'm definitely open to rearranging the order of which the appPath should be accepted if that is something which should be explored.

@ajthor
Copy link
Author

ajthor commented Apr 28, 2014

If the bower config option is pointless or redundant, this is more in an attempt to standardize the way that the angular and backbone generators accept the appPath option. Right now, the angular generator is using the old backbone generator's style and it'd be nice to standardize the two.

@napolitano
Copy link

If you choose bower.json as the place for the app-path configuration it will lead to a fragmented storage of generator options which i personally don't prefer. yo-rc.json defines a bit more that just the app-path and it seems to more consistent to keep all these generator specific options at one place - yo-rc.json looks at this time pragmatic and good enough to me. Just my 2 cents ;)

@eddiemonge
Copy link
Member

@ajthor don't count on the angular generator keeping the bower.json app path because .... well it probably won't. The only reason its still there is I haven't got around to doing the same .yo-rc changes that have been done here.

@revathskumar
Copy link
Member

Closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants